package com.neutech.jdbc.test;

import java.sql.Connection;
import java.sql.Statement;

public class JDBCTest05 {
    public static void main(String[] args) {
        // 删除操作
        Connection conn = DBUtil.getConnection();// 连接驱动
        Statement stmt = DBUtil.getStatement(conn);// 创建stmt语句对象
//        String sql = "delete from fruits where f_id = 'x1'";// sql语句
        String sql = "insert into fruits values('x1',107,'vvvv',7.25)";// sql语句
        int rows = DBUtil.executeUpdate(stmt,sql);// 执行
        System.out.println(rows);
        DBUtil.close(stmt,conn);
    }
}
